package model.gamemenu;

import java.awt.Font;

/**
 * MenuItem.java
 * Purpose: a selectable item in an options list
 * 
 * @author Hans Brems
 * @version 1.0 01/12/2011
 */

public class MenuItem {
	/* The font size */
	private static int fontSize = 50;
	/* The font of the menu item */
	private static Font font = new Font("Arial", Font.BOLD, fontSize);
	/* Padding */
	private static int padding = 5;
	/* The height of the menu item */
	private static int lineHeight = fontSize + padding;
	/* Indication if the item has been selected */
	private boolean selected; 
	/* The object that the item holds */
	private Object object;
	
	/** Constructs a new menu item */
	public MenuItem(){
	}
	
	/** Constructs a new menu item */
	public MenuItem(Object object) {
		this.object = object;
	}

	/** Returns the font of the menu item */
	public Font getFont() {
		return font;
	}
	
	/** Returns the line height of the menu item */
	public int getLineHeight() {
		return lineHeight;
	}

	/** Returns the selection of the menu item */
	public boolean isSelected() {
		return selected;
	}

	/** Sets the selection of the menu item */
	public void setSelected(boolean selected) {
		this.selected = selected;
	}

	/** Returns the text of the menu item */
	public void setObject(Object object) {
		this.object = object;
	}
	
	/** Returns a string representation of the object */
	@Override
	public String toString() {
		return this.object.toString();
	}
}